﻿using System.Collections.Generic;
using System.Linq;

namespace MaciejGrabek.WebAPITools
{
    public class HeaderBuilder
    {
        public Dictionary<string, string> Headers {get; private set;}

        public HeaderBuilder()
        {
            Headers = new Dictionary<string, string>();
        }

        public void AddHeader(string key, string value)
        {
            if (!Headers.Keys.Contains(key))
            {
                Headers.Add(key, value);
            }
            else
            {
                Headers[key] = value;
            }
        }
    }
}
